CCM-16572: Migrating npm to pnpm#376
Conversation
4ea76c8 to
287567a
Compare
|
Jest 30 isn't compatible with ts-jest 29, so I have downgraded the version in the packages where these were used together and it caused a problem. It seems there were a bit of a mix of 29/30 across different packages, so possibly the migration just triggered something in the affected packages. ChatGPT analysis of what would be needed to upgrade:
|
# Conflicts: # package-lock.json # src/eventcatalog/package-lock.json
There was a problem hiding this comment.
I believe this package-lock.json existed because we hadn't made src/eventcatalog part of the root NPM application. Given you don't seem to have added it to pnpm-workspace.yaml either, should this file have been replaced with a pnpm-lock.yaml?
| "lint": "eslint .", | ||
| "lint:fix": "npm run lint -- --fix", | ||
| "test:contract": "npm run clean && npm run test:pact:consumer && npm run test:pact:provider", | ||
| "lint:fix": "pnpm run lint -- --fix", |
There was a problem hiding this comment.
Strangely this fails to run on my machine. It needs to be:
| "lint:fix": "pnpm run lint -- --fix", | |
| "lint:fix": "pnpm run lint --fix", |
Not sure why it fails on my machine, but fine in the pipeline.
There was a problem hiding this comment.
The pipeline only runs lint not lint:fix.
| "scripts": { | ||
| "lint": "eslint .", | ||
| "lint:fix": "npm run lint -- --fix", | ||
| "lint:fix": "pnpm run lint -- --fix", |
There was a problem hiding this comment.
| "lint:fix": "pnpm run lint -- --fix", | |
| "lint:fix": "pnpm run lint --fix", |
| if (event.type.includes('pdf.analysed')) { | ||
| // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion | ||
| return validatePDFAnalysed(event as PDFAnalysed, logger); | ||
| } | ||
| if (event.type.includes('invalid.attachment.received')) { | ||
| return validateInvalidAttachmentReceived( | ||
| // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion | ||
| event as InvalidAttachmentReceived, | ||
| logger, | ||
| ); | ||
| } |
There was a problem hiding this comment.
It seems there is no need for the type assertions.
| if (event.type.includes('pdf.analysed')) { | |
| return validatePDFAnalysed(event, logger); | |
| } | |
| if (event.type.includes('invalid.attachment.received')) { | |
| return validateInvalidAttachmentReceived(event, logger); | |
| } |
Description
Context
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.